Skip to content

feat(node)!: Use db.query and db span ops for Redis - #22690

Merged
msonnb merged 3 commits into
developfrom
ms/js-3105-redis-db-ops
Jul 29, 2026
Merged

feat(node)!: Use db.query and db span ops for Redis#22690
msonnb merged 3 commits into
developfrom
ms/js-3105-redis-db-ops

Conversation

@msonnb

@msonnb msonnb commented Jul 27, 2026

Copy link
Copy Markdown
Member

Commands and batches use db.query instead of db.redis; connect spans use db instead of db.redis.connect. The datastore is already identified by db.system.name=redis, so the library-specific op leaf was redundant.

Command spans in the DC subscriber now also set db.operation.name — the command was only in db.query.text before.

Two command paths in tracing-channel/redis.ts were already emitting a bare db; those become db.query too, since they carry a statement. Redis used as a cache keeps its cache.* ops (that classification happens in the response hook and is unaffected).

Part of #22446

@linear-code

linear-code Bot commented Jul 27, 2026

Copy link
Copy Markdown

JS-3105

@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.82 kB - -
@sentry/browser - with treeshaking flags 28.02 kB - -
@sentry/browser (incl. Tracing) 47.1 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 47.1 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.81 kB - -
@sentry/browser (incl. Tracing, Replay) 86.4 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.84 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 91.12 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 103.77 kB - -
@sentry/browser (incl. Feedback) 47.13 kB - -
@sentry/browser (incl. sendFeedback) 34.66 kB - -
@sentry/browser (incl. FeedbackAsync) 39.76 kB - -
@sentry/browser (incl. Metrics) 30.89 kB - -
@sentry/browser (incl. Logs) 31.12 kB - -
@sentry/browser (incl. Metrics & Logs) 31.8 kB - -
@sentry/react 31.6 kB - -
@sentry/react (incl. Tracing) 49.33 kB - -
@sentry/vue 34.74 kB - -
@sentry/vue (incl. Tracing) 49.05 kB - -
@sentry/svelte 29.85 kB - -
CDN Bundle 31.87 kB - -
CDN Bundle (incl. Tracing) 47.45 kB - -
CDN Bundle (incl. Logs, Metrics) 33.42 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 48.83 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 72.78 kB - -
CDN Bundle (incl. Tracing, Replay) 85.09 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 86.39 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 90.86 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.17 kB - -
CDN Bundle - uncompressed 95.04 kB - -
CDN Bundle (incl. Tracing) - uncompressed 142.25 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.75 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 146.23 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 224.51 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 261.51 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 265.48 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 275.22 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 279.17 kB - -
@sentry/nextjs (client) 51.92 kB - -
@sentry/sveltekit (client) 47.51 kB - -
@sentry/core/server 79.6 kB - -
@sentry/core/browser 51.6 kB - -
@sentry/node 121.31 kB +0.02% +18 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 166 B - -
@sentry/node - without tracing 84.77 kB -0.01% -1 B 🔽
@sentry/aws-serverless 93.02 kB - -
@sentry/cloudflare (withSentry) - minified 197.59 kB - -
@sentry/cloudflare (withSentry) 485.77 kB - -

View base workflow run

@msonnb
msonnb changed the base branch from ms/js-3105-cache-ops to develop July 27, 2026 13:07
@msonnb
msonnb force-pushed the ms/js-3105-redis-db-ops branch 2 times, most recently from 255327a to abf5234 Compare July 27, 2026 14:59
msonnb and others added 2 commits July 29, 2026 11:43
The datastore belongs in `db.system.name`, not the op. Commands and
batches use `db.query`, connects use `db`. Command spans now also set
`db.operation.name`. Cache-classified spans keep their `cache.*` ops.

Ref: JS-3105

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@msonnb
msonnb force-pushed the ms/js-3105-redis-db-ops branch from abf5234 to c793917 Compare July 29, 2026 09:46
@msonnb
msonnb requested review from a team, isaacs and mydea and removed request for a team July 29, 2026 09:46
@msonnb
msonnb marked this pull request as ready for review July 29, 2026 09:47
@msonnb
msonnb requested review from a team as code owners July 29, 2026 09:47

@isaacs isaacs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, apart from the merge conflict, of course. 👍

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f09a103. Configure here.

Comment thread packages/server-utils/src/integrations/tracing-channel/redis.ts
@msonnb
msonnb enabled auto-merge (squash) July 29, 2026 15:40
@msonnb
msonnb merged commit 862c935 into develop Jul 29, 2026
391 of 395 checks passed
@msonnb
msonnb deleted the ms/js-3105-redis-db-ops branch July 29, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants